﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;

namespace Foundation.EntityFrameworkCore
{
    public class SaveChangesFailedEventArgs : EventArgs
    {
        public SaveChangesFailedEventArgs(DbContext dbContext, IList<EntityEntry> entries, Exception exception)
        {
            DbContext = dbContext;
            Entries = entries;
            Exception = exception;
        }

        public DbContext DbContext { get; }

        public IList<EntityEntry> Entries { get; }

        public Exception Exception { get; }
    }

}
